package cl.orangepeople.whyem.portal.negotiations.utils;

import cl.orangepeople.whyem.portal.backend.dto.negotiations.NegotiationDTO;
import com.liferay.faces.portal.context.LiferayFacesContext;
import com.liferay.portal.model.User;
import java.math.BigDecimal;

public class whyemUtils {

    public static String getUserClientID() {
        User user = LiferayFacesContext.getInstance().getUser();
        return user.getScreenName();
    }
    
    public static NegotiationDTO getNegotiationInputParameter(final String clientID, final BigDecimal negotiationID) {
        return new NegotiationDTO() {
            {
                setClientID(clientID);
                setNegotiationID(negotiationID.toString());
            }
        };
    }
    
}
